package com.chen.feign.order;

import com.chen.model.entity.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * @author cgj
 * @date 5/4/25 9:20 AM
 */
@FeignClient(value = "service-order")
public interface OrderFeignClient {
    /**
     * /api/order/orderInfo/auth/updateOrderByOrderNo/{orderStatus}/{orderNo}
     *  修改订单状态
     */
    @PutMapping("/api/order/orderInfo/auth/updateOrderByOrderNo/{orderStatus}/{orderNo}")
    public void updateOrderByOrderNo(@PathVariable(value = "orderStatus") Integer orderStatus,
                                     @PathVariable(value = "orderNo") String orderNo);

    /**
     * 根据orderNo查询订单信息
     * @param orderNo
     * @return
     */
    @GetMapping("/api/order/orderInfo/auth/getOrderInfoByOrderNo/{orderNo}")
    public OrderInfo getOrderInfoByOrderNo(@PathVariable String orderNo);
}
